# 打印1~10的立方，使用切片
cubics = [num ** 3 for num in range(1, 11)]
for cubic in cubics:
    print(cubic)

print("The first three items in the list are:")
for cubic in cubics[:3]:
    print(cubic)

print("Three items from the middle of the list are:")
for cubic in cubics[4:7]:
    print(cubic)

print("The last three items in the list are:")
for cubic in cubics[-3:]:
    print(cubic)
